package com.example.demo.business.controller;

import java.time.LocalDateTime;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.example.demo.business.feign.MemberFeign;
import com.example.demo.business.feign.TradeFeign;
import com.example.demo.business.service.BusinessService;

import jakarta.annotation.Resource;

@RequestMapping("/business")
@RestController
public class BusinessController {

    @Autowired
    private BusinessService businessService;
    @Resource
    private MemberFeign     memberFeign;
    @Resource
    private TradeFeign      orderFeign;

    @RequestMapping("/member/test")
    public String memberTest(Integer id) {
        String result = memberFeign.test();
        return "business member test: " + result;
    }

    @RequestMapping("/test")
    public String test() {
        businessService.test();
        return LocalDateTime.now().toString();
    }

}
